package com.sxmmall.search.controller;

import com.sxmmall.common.to.es.SkuEsModel;
import com.sxmmall.common.utils.R;
import com.sxmmall.search.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RequestMapping("/search")
@RestController
public class ElasticSaveController {

    @Autowired
    private ProductService productService;
        // 上架商品
    @PostMapping("/product")
    public R productStatusUp(List<SkuEsModel> skuEsModels){
        productService.productStatusUp(skuEsModels);
        return R.ok();
    }

}
